import React, { FC, useEffect } from 'react'
import {inject,observer} from 'mobx-react'
import Mytitle from '../../../../components/Mytitle'
import { Tabs } from 'antd';
import Teacher from '../../../../components/teacher';
import Teacher1 from '../../../../components/teacher1';

const { TabPane } = Tabs;


const Banji:FC<any>=({
  classes,
  user
})=> {
  const {getClassList,classList,classList1,getClassList1,classList2}=classes
  const {teacherList_filter,filterTeacherList}=user

  useEffect(()=>{
    getClassList()
    filterTeacherList()
    getClassList1()
  },[])
  console.log(teacherList_filter);
  
  return (
    <div>
        <Mytitle text="课程分配"></Mytitle>
        
        <div>
        <Tabs defaultActiveKey="1">
            <TabPane tab="未分配课程" key="1">
                <Teacher 
                getClassList={getClassList}
                classList={classList}
                teacherList_filter={teacherList_filter}
                filterTeacherList={filterTeacherList}
                getClassList1={getClassList1}
                classList1={classList1}
                

                ></Teacher>
            </TabPane>
            <TabPane tab="已分配课程" key="2">
            <Teacher1
             getClassList1={getClassList1}
             classList2={classList2}
            >

            </Teacher1>
            </TabPane>
        </Tabs>
        </div>
    </div>
  )
}
export default inject('classes','user')(observer(Banji))
